package com.ruoyi.contarctbill.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.contarct.domain.HouseContarct;
import com.ruoyi.income.domain.HouseContarctIncome;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 账单对象 house_contarct_bill
 * 
 * @author hct
 * @date 2022-02-16
 */
@Data
public class HouseContarctBill extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;


    /** 应收收费 */
    @Excel(name = "应收收费")
    private BigDecimal fee;



    /** 归属合同id */
    @Excel(name = "归属合同id")
    private Long contarctId;

    /** 计划备注 */
    @Excel(name = "计划备注")
    private String contarctPlanbz;

    /** 计费周期 */
    @Excel(name = "计费周期")
    private String contarctPlandate;

    /** 用于处理是否显示在计划管理  0代表未结算完成，1代表已结算完毕 */
    @Excel(name = "用于处理是否显示在计划管理  0代表未结算完成，1代表已结算完毕")
    private Integer isover;

    /** 已收款金额 */
    @Excel(name = "已收款金额")
    private BigDecimal ysfee;

    /** 计费结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "计费结束时间", width = 30, dateFormat = "yyyy-MM-dd hh:mm:ss")
    private Date contarctPlanEnddate;

    /** 计费开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "计费开始时间", width = 30, dateFormat = "yyyy-MM-dd hh:mm:ss")
    private Date contarctPlanStartdate;

    /** 用于判断是否退租清算  0代表正常1代表退租清算 */
    @Excel(name = "用于判断是否退租清算  0代表正常1代表退租清算")
    private Long refundStatus;

    /** 0代表还在使用 1代表已失效结算日以后的费用单都失效了 */
    @Excel(name = "0代表还在使用 1代表已失效结算日以后的费用单都失效了")
    private Long status;

    @Excel(name = "合同名称")
    private String billName;

    @Excel(name = "账单类型")
    private Integer billType;

    @Excel(name = "账单截至日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    /** 账单明细 */
    private List<HouseContarctIncome> houseContarctIncomes;

    private String contractName;

    private BigDecimal billShould;

    private BigDecimal billAlready;

    private HouseContarct houseContarct;

    /** 搜索条件 */
    /** 客户名称 */
    private String companyName;
    /** 合同名称 */
    private String contarctName;
    /** 合同编码 */
    private String contarctCode;
    /** 账单月份 */
    private String billMonth;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("createTime", getCreateTime())
            .append("fee", getFee())
            .append("updateTime", getUpdateTime())
            .append("contarctId", getContarctId())
            .append("createBy", getCreateBy())
            .append("updateBy", getUpdateBy())
            .append("contarctPlanbz", getContarctPlanbz())
            .append("contarctPlandate", getContarctPlandate())
            .append("isover", getIsover())
            .append("ysfee", getYsfee())
            .append("contarctPlanEnddate", getContarctPlanEnddate())
            .append("contarctPlanStartdate", getContarctPlanStartdate())
            .append("refundStatus", getRefundStatus())
            .append("status", getStatus())
            .toString();
    }
}
